package com.yyge.controller.admin.mapstruct;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yyge.common.vo.resp.PageResp;
import com.yyge.controller.admin.orderdetail.req.OrderDetailReq;
import com.yyge.controller.admin.orderdetail.resp.OrderDetailResp;
import com.yyge.entity.OrderDetail;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface OrderDetailConverter {
    OrderDetailConverter MAPPER = Mappers.getMapper(OrderDetailConverter.class);

     @Mapping(source="records",target="rows")
     PageResp page2vo(Page list);

     OrderDetail orderdetail2req(OrderDetailReq req);
     List<OrderDetailResp> orderdetail2resp(List<OrderDetail> list);
}
